$(function(){
	var box=$("#box"),comments=$("#comments"),leftImg=$(".leftImg");
	var center=$(".center"),right=$(".right");
	$.ajax({
		type:"get",
		url:"http://sclub.jd.com/productpage/p-2951490-s-0-t-5-p-0.html",
		dataType:"JSONP",
		success:function(data){
			console.log(data.comments[0]);
			console.log(data.comments[1]);
			
			for(var i=0;i<10;i++){
				var score=data.comments[i].score;
				//score
				for(var j=0;j<5;j++){
					if(j>=score){
						$(".leftImg").eq(j).attr("src","images/dark.png");
					}
				}
				$(".left1 span").text(data.comments[i].days);
				$(".left2").text(data.comments[i].creationTime);
				$(".left3").text(data.comments[i].productColor);
				//$(".left4").text(data.comments[i].productColor);
				$(".center1").text(data.comments[i].content);
				$(".center2").eq(1).text("回复("+data.comments[i].replyCount+")");
				$(".right .name").text(data.comments[i].nickname);
				$(".right .right1span1").text(data.comments[i].userLevelName);
				$(".right .right1span2").text(data.comments[i].userProvince);
				$(".right2").html(data.comments[i].userClientShow);
				box.html()=comments.html();
				
				console.log(i+box.html());
				
				//box.append(m);
			}
		},
	});
});